package com.liumin.publiclib.helper;

import android.content.Context;
import android.content.pm.ApplicationInfo;

/**
 * 描述：获取app相关信息工具类
 * 时间：2024/9/5 16:24
 * 作者:  Liumin
 */
public class AppHelper {
    //判断app是否是debug模式
    public static boolean isDebug(Context ctx){
        try {
            ApplicationInfo info = ctx.getApplicationInfo();
            return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
        } catch (Exception e) {
            return false;
        }
    }
}
